home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / mobile / fma-2.0-stable-setup.exe / {app} / sframework / helper / config / ArrayData.cls next >
Encoding:
Visual Basic class definition  |  2004-09-09  |  1.2 KB  |  58 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "ArrayData"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = True
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = False
  14. Private m_Array
  15.  
  16. Public Sub SetArray(ByRef ary)
  17.     m_Array = ary
  18. End Sub
  19.  
  20. Public Function GetArray()
  21.     GetArray = m_Array
  22. End Function
  23.  
  24. Public Property Get First()
  25.     First = LBound(m_Array)
  26. End Property
  27.  
  28. Public Property Get Last()
  29.     Last = UBound(m_Array)
  30. End Property
  31.  
  32. Property Get Item(idx)
  33.     Item = m_Array(idx)
  34. End Property
  35.  
  36. Public Property Let Item(idx, val)
  37.     m_Array(idx) = val
  38. End Property
  39.  
  40. Public Property Set Item(idx, object)
  41.     Set m_Array(idx) = object
  42. End Property
  43.  
  44. Public Sub Swap(i, j)
  45.     Dim h
  46.     If IsObject(Me.Item(i)) Then 'object swap
  47.         Set h = Me.Item(i)
  48.         Set Me.Item(i) = Me.Item(j)
  49.         Set Me.Item(j) = h
  50.     Else
  51.         h = Me.Item(i)
  52.         Me.Item(i) = Me.Item(j)
  53.         Me.Item(j) = h
  54.     End If
  55. End Sub
  56.  
  57.  
  58.